Skip to content

feat(highwind): read metrics from metric-hub - #621

Merged
jaredlockhart merged 3 commits into
mozilla:mainfrom
JaredLockhart-Mozilla:exp-7631-highwind-metric-hub
Oct 30, 2026
Merged

jaredlockhart merged 3 commits into
mozilla:mainfrom
JaredLockhart-Mozilla:exp-7631-highwind-metric-hub

Conversation

@jaredlockhart

Copy link
Copy Markdown
Contributor

Because

  • Highwind's metrics and data sources are hard-coded, so they drift from the definitions Jetstream reads
  • Each experiment's resolved metric list is already computed in the Experimenter mirror

This commit

  • Reads each experiment's metric names off the mirror's resolved Jetstream metric set and builds their SQL from metric-hub's nimbus/ definitions via metric-config-parser's aggregation_plan()
  • Resolves the analysis unit's source column per metric-hub data source instead of per app, and reads windows from the plan's cumulative_window/incremental_window/repeat_windows fields
  • Reports a metric that has no nimbus/ definition, or whose windows Highwind cannot express, against the experiments that asked for it, rather than computing it
  • Removes the hard-coded guardrail metrics, data sources and reducers, and installs git in the image so metric-config-parser can clone metric-hub at run time

https://mozilla-hub.atlassian.net/browse/EXP-7631

Checklist for reviewer:

  • Commits should reference a bug or github issue, if relevant (if a bug is referenced, the pull request should include the bug number in the title)

  • Scan the PR and verify that no changes (particularly to .circleci/config.yml) will cause environment variables (particularly credentials) to be exposed in test logs

  • Ensure the container image will be using permissions granted to telemetry-airflow responsibly.

@jaredlockhart
jaredlockhart requested a review from a team as a code owner October 27, 2026 17:34
Comment thread jobs/highwind/highwind/metrics.py Resolved
Comment thread jobs/highwind/highwind/analysis.py Resolved
Comment thread jobs/highwind/highwind/analysis.py Resolved
Comment thread jobs/highwind/highwind/analysis.py Resolved
Comment thread jobs/highwind/highwind/discovery.py Resolved
Comment thread jobs/highwind/highwind/metrics.py Resolved
Comment thread jobs/highwind/highwind/units.py Resolved
@BenWu
BenWu requested a review from a team as a code owner October 28, 2026 19:42
Because

* Highwind's metrics and data sources are hard-coded, so they drift from the definitions Jetstream reads
* Each experiment's resolved metric list is already computed in the Experimenter mirror

This commit

* Reads each experiment's metric names off the mirror's resolved Jetstream metric set and builds their SQL from metric-hub's nimbus/ definitions via metric-config-parser's aggregation_plan()
* Resolves the analysis unit's source column per metric-hub data source instead of per app, and reads windows from the plan's cumulative_window/incremental_window/repeat_windows fields
* Reports a metric that has no nimbus/ definition, or whose windows Highwind cannot express, against the experiments that asked for it, rather than computing it
* Removes the hard-coded guardrail metrics, data sources and reducers, and installs git in the image so metric-config-parser can clone metric-hub at run time

https://mozilla-hub.atlassian.net/browse/EXP-7631
Because

* A metric-hub window that doesn't fit the bucket grid stopped the whole run
* Every source was scanned for every unit with every experiment's metrics

This commit

* Reports metrics whose windows don't fit the 7-day bucket grid instead of failing the run
* Builds each unit's queries from its own experiments' metrics and skips source and unit pairs with nothing to compute

https://mozilla-hub.atlassian.net/browse/EXP-7631
@jaredlockhart
jaredlockhart force-pushed the exp-7631-highwind-metric-hub branch from b801856 to b61063b Compare October 28, 2026 21:10
Because

* Calls through a module named metrics read like operations on a list of metrics
* The discovery query grouped a list that is already one entry per metric

This commit

* Imports the metric-hub loading functions by name, with names that say what each does
* Reads each experiment's metric list straight from the mirror without regrouping it
* Rewords the run_windows docstring

https://mozilla-hub.atlassian.net/browse/EXP-7631
@BenWu
BenWu removed the request for review from a team October 29, 2026 15:58
@jaredlockhart
jaredlockhart merged commit c6090d5 into mozilla:main Oct 30, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants